import Vue from 'vue'
import Router from 'vue-router'
// import Home from '@/pages/home/Home'
// import SignIn from '@/pages/sigin/SignIn'
// import Tottle from '@/pages/siginTotle/SiginTottle'
// import Set from '@/pages/set/Set'
import Login from '@/pages/login/Login'
// import Remember from '@/pages/remmember/Remember'
// import Register from '@/pages/register/Register'
import TeaHome from '@/teacher/teahome/TeaHome'
import TeaSigin from '@/teacher/teasigin/TeaSigin'
import TeaSet from '@/teacher/teaSet/TeaSet'
import T_Remember from '@/teacher/tearemember/T_Remember'


Vue.use(Router)

export default new Router({
  routes: [

    {path:'/',
      name:'Login',
      component:Login
    },
    {
      path: '/T_Remember',
      name: 'T_Remember',
      component: T_Remember
    },
    {
      path: '/TeaHome',
      name: 'TeaHome',
      component: TeaHome
    },
    {
      path: '/TeaSigin',
      name: 'TeaSigin',
      component: TeaSigin
    },
    {
      path: '/TeaSet',
      name: '设置',
      component: TeaSet
    }
  ],

})
// if (window.localStorage.getItem('token')) {
//   store.commit(types.LOGIN, window.localStorage.getItem('token'))
// }
//
// const router = new VueRouter({
//   routes
// });
//
// router.beforeEach((to, from, next) => {
//   if (to.matched.some(r => r.meta.requireAuth)) {
//     if (store.state.token) {
//       next();
//     }
//     else {
//       next({
//         path: '/login',
//         query: {redirect: to.fullPath}
//       })
//     }
//   }
//   else {
//     next();
//   }
// })
